<?php
namespace Common\Widget;
use Think\Controller;

/**
 * Class FollowWidget
 * @package Common\Widget
 * @author:xjw129xjt(肖骏涛) xjt@ourstu.com
 */
class FollowWidget extends Controller {
    /**
     * follow  关注按钮
     * @param int $follow_who
     * @author:xjw129xjt(肖骏涛) xjt@ourstu.com
     */
    public function follow($follow_who=0){
        $follow_who=intval($follow_who);
        $who_follow = is_login();
        $is_following = D('Follow')->where(array('who_follow'=>$who_follow,'follow_who'=>$follow_who))->find();
        $this->assign('is_following',$is_following?1:0);
        $this->assign('follow_who',$follow_who);
        $this->display(T('Application://Common@Widget/follow'));
    }


}